home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 July
/
Macworld (1999-07).dmg
/
Shareware World
/
Graphics
/
Popup Xtra 3.2
/
POPUP.X32
/
TEXT
/
TEXT_CASTSCRIPT
next >
Wrap
Text File
|
1999-03-18
|
2KB
|
47 lines
---------------------------------------------------
-------------- on menuItemSelected ----------------
---------------------------------------------------
-- The Popup Xtra castmember will send the "menuItemSelected" event to Director
-- whenever a valid menu selection has been made.
--
-- The menuItemSelected event is sent when one of the following occurs:
-- (1) The user clicks the mouse on the Popup Xtra sprite, selects an item and
-- then releases the mouse button (and the trapEvents property has been set to TRUE
-- either through scripting or the Castmember Properties dialog), or
-- (2) The Activate() command has been explicitly called and the user selects an item and
-- then releases the mouse button.
--
-- NOTE: If you are using the activateMenu command, *always* set the trapsEvents property
-- to FALSE, which can be done in the Castmember Properties dialog or through scripting.
-- This will allow your scripting to control the appearance of the menu and not Director.
-- Arguments:
-- me: the Popup Xtra sprite that was used to make the selection
-- menuSpec: the selected item's menu specification (the selectedSpec property)
-- menuText: the selected item's text (the selectedText property)
-- memberRef: the Popup Xtra castmember that was used to make the selection
on menuItemSelected me, menuSpec, menuText, memberRef
-- your Lingo code goes here
end
-- TIPS:
-- The menuItemSelected event sent first to the sprite. If no sprite script or behavior
-- is attached which processes this event, then the event is sent to this castmember script.
-- The order of calling this handler is as follows:
-- Sprite script-->Cast script-->Frame script-->Movie Script
-- So, if you want to have the same Popup Xtra castmember used for numerous sprites, you
-- need to add this event handler to the sprite script (the castmember handler will never get
-- called if there is a sprite script event handler for the menuItemSelected event.)
-- If you want to have a movie handler control *all* of the Popup Xtra interactions, you can
-- comment out the menuItemSelected handler from all of the castmember scripts and add one to
-- the movie script instead. You can then examine the memberRef argument to determine which
-- menu was selected.